<template>
  <div id="app">
    <el-container>
      <el-header style="font-weight: 800">
        <!-- 导航菜单 -->
        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal"  router>
          <el-menu-item index="/" style="font-size: 28px;color: #3a8ee6;margin-left: 80px">肆记</el-menu-item>
          <el-menu-item index="/index" :show-timeout="3000">主页</el-menu-item>
          <el-menu-item index="/users" :show-timeout="3000">用户管理</el-menu-item>
          <el-menu-item index="/message">消息中心</el-menu-item>
          <el-menu-item index="/order">订单管理</el-menu-item>

          <el-menu-item style="margin-left: 800px">
            <el-dropdown trigger="hover">
              <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"></el-avatar>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>设置</el-dropdown-item>
                <el-dropdown-item>退出</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </el-menu-item>
        </el-menu>
      </el-header>
      <el-main>
        <el-row>
          <el-col :span="20" :offset="2">
            <router-view/>
          </el-col>
        </el-row>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      activeIndex: this.$route.path,
    };
  },
  methods: {
    // handleSelect(key, keyPath) {
    //   console.log(key, keyPath);
    //   this.$router.push(key)
    // }
  }
}
</script>

<style>

</style>
